package com.imoblife.brainwavestus.product;

import java.util.ArrayList;

public class WaveCollection extends Product {
	
	private ArrayList<Product> mProductList;
	
	public WaveCollection() {
		
		super();
		mProductList = new ArrayList<Product>();
	}
	
	@Override
	public boolean addProduct(Product product) {
		
		if(mProductList != null) {
			
			return mProductList.add(product);
		}
		
		return false;
	}

	@Override
	public boolean removeProduct(Product product) {
		
		if(mProductList != null) {
			
			return mProductList.remove(product);
		}

		return false;
	}

	@Override
	public Product getChildProduct(int index) {
		
		if(mProductList != null) {
			
			return mProductList.get(index);
		}
		
		return null;
	}

	@Override
	public ArrayList<Product> getAllChild() {
		
		return mProductList;
	}

}
